package com.data.monitoring.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户个性化设置
 * </p>
 *
 * @author HanYiMing
 * @since 2025-05-28
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("user_settings")
@ApiModel(value = "UserSettings对象", description = "用户个性化设置")
public class UserSettings extends Model<UserSettings> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("关联用户系统ID")
    @TableId("user_id")
    private Integer userId;

    @ApiModelProperty("默认刷新间隔(秒)")
    @TableField("default_refresh_interval")
    private Integer defaultRefreshInterval;

    @ApiModelProperty("自定义显示列配置")
    @TableField("display_columns")
    private String displayColumns;

    @ApiModelProperty("通知设置")
    @TableField("notification_settings")
    private String notificationSettings;

    @TableField("created_at")
    private LocalDateTime createdAt;

    @TableField("updated_at")
    private LocalDateTime updatedAt;

    @Override
    public Serializable pkVal() {
        return this.userId;
    }
}
